@@ -0,0 +1,3 @@ |
||
| 1 |
+class AgentStep < ActiveRecord::Base |
|
| 2 |
+ belongs_to :mission_agent |
|
| 3 |
+end |
@@ -0,0 +1,14 @@ |
||
| 1 |
+class CreateAgentSteps < ActiveRecord::Migration |
|
| 2 |
+ def change |
|
| 3 |
+ create_table :agent_steps do |t| |
|
| 4 |
+ t.references :mission_agent, index: true |
|
| 5 |
+ t.integer :step |
|
| 6 |
+ t.string :title |
|
| 7 |
+ t.text :description |
|
| 8 |
+ t.boolean :completed |
|
| 9 |
+ t.datetime :completed_date |
|
| 10 |
+ |
|
| 11 |
+ t.timestamps |
|
| 12 |
+ end |
|
| 13 |
+ end |
|
| 14 |
+end |
@@ -11,11 +11,24 @@ |
||
| 11 | 11 |
# |
| 12 | 12 |
# It's strongly recommended that you check this file into your version control system. |
| 13 | 13 |
|
| 14 |
-ActiveRecord::Schema.define(version: 20150121034204) do |
|
| 14 |
+ActiveRecord::Schema.define(version: 20150121034640) do |
|
| 15 | 15 |
|
| 16 | 16 |
# These are extensions that must be enabled in order to support this database |
| 17 | 17 |
enable_extension "plpgsql" |
| 18 | 18 |
|
| 19 |
+ create_table "agent_steps", force: true do |t| |
|
| 20 |
+ t.integer "mission_agent_id" |
|
| 21 |
+ t.integer "step" |
|
| 22 |
+ t.string "title" |
|
| 23 |
+ t.text "description" |
|
| 24 |
+ t.boolean "completed" |
|
| 25 |
+ t.datetime "completed_date" |
|
| 26 |
+ t.datetime "created_at" |
|
| 27 |
+ t.datetime "updated_at" |
|
| 28 |
+ end |
|
| 29 |
+ |
|
| 30 |
+ add_index "agent_steps", ["mission_agent_id"], name: "index_agent_steps_on_mission_agent_id", using: :btree |
|
| 31 |
+ |
|
| 19 | 32 |
create_table "blog_posts", force: true do |t| |
| 20 | 33 |
t.string "title" |
| 21 | 34 |
t.string "slug" |
@@ -0,0 +1,17 @@ |
||
| 1 |
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html |
|
| 2 |
+ |
|
| 3 |
+one: |
|
| 4 |
+ mission_agent_id: |
|
| 5 |
+ step: 1 |
|
| 6 |
+ title: MyString |
|
| 7 |
+ description: MyText |
|
| 8 |
+ completed: |
|
| 9 |
+ completed_date: 2015-01-21 01:46:40 |
|
| 10 |
+ |
|
| 11 |
+two: |
|
| 12 |
+ mission_agent_id: |
|
| 13 |
+ step: 1 |
|
| 14 |
+ title: MyString |
|
| 15 |
+ description: MyText |
|
| 16 |
+ completed: |
|
| 17 |
+ completed_date: 2015-01-21 01:46:40 |
@@ -0,0 +1,7 @@ |
||
| 1 |
+require 'test_helper' |
|
| 2 |
+ |
|
| 3 |
+class AgentStepTest < ActiveSupport::TestCase |
|
| 4 |
+ # test "the truth" do |
|
| 5 |
+ # assert true |
|
| 6 |
+ # end |
|
| 7 |
+end |